﻿Imports System.Data.SqlClient
Public Class home

    Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
        Dim frm As New Login
        frm.Show()
        Me.Close()
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnemployee.Click
        employeeinfo.Close()
        employeeinfo.TopLevel = False
        Main.penelmain.Controls.Add(employeeinfo)
        employeeinfo.FormBorderStyle = Windows.Forms.FormBorderStyle.None
        employeeinfo.WindowState = FormWindowState.Maximized
        Main.Show()
        employeeinfo.Show()
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btncategory.Click
        foodlist.Close()
        foodlist.TopLevel = False
        Main.penelmain.Controls.Add(foodlist)
        foodlist.FormBorderStyle = Windows.Forms.FormBorderStyle.None
        foodlist.WindowState = FormWindowState.Maximized
        Main.Show()
        foodlist.Show()
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsallfood.Click
        Order_food.Close()
        Order_food.TopLevel = False
        Main.penelmain.Controls.Add(Order_food)
        Order_food.FormBorderStyle = Windows.Forms.FormBorderStyle.None
        Order_food.WindowState = FormWindowState.Maximized
        Main.Show()
        Order_food.Show()
    End Sub

    Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnuser.Click
        User.Close()
        User.TopLevel = False
        Main.penelmain.Controls.Add(User)
        User.FormBorderStyle = Windows.Forms.FormBorderStyle.None
        User.WindowState = FormWindowState.Maximized
        Main.Show()
        User.Show()
    End Sub

    Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnstatistic.Click
        startistic.Close()
        startistic.TopLevel = False
        Main.penelmain.Controls.Add(startistic)
        startistic.FormBorderStyle = Windows.Forms.FormBorderStyle.None
        startistic.WindowState = FormWindowState.Maximized
        Main.Show()
        startistic.Show()
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        Backup.Close()
        Backup.TopLevel = False
        Main.penelmain.Controls.Add(Backup)
        Backup.FormBorderStyle = Windows.Forms.FormBorderStyle.None
        Backup.WindowState = FormWindowState.Maximized
        Main.Show()
        Backup.Show()
    End Sub

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
        tablenumber.Close()
        tablenumber.TopLevel = False
        Main.penelmain.Controls.Add(tablenumber)
        tablenumber.FormBorderStyle = Windows.Forms.FormBorderStyle.None
        tablenumber.WindowState = FormWindowState.Maximized
        Main.Show()
        tablenumber.Show()
    End Sub

    Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnchangmoney.Click
        changmoney.ShowDialog()
    End Sub

    Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click
        Totalmoney.Close()
        Totalmoney.TopLevel = False
        Main.penelmain.Controls.Add(Totalmoney)
        Totalmoney.FormBorderStyle = Windows.Forms.FormBorderStyle.None
        Totalmoney.WindowState = FormWindowState.Maximized
        Main.Show()
        Totalmoney.Show()
    End Sub

    Private Sub home_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Label1.Text = Login.txtusername.Text
        Login.Hide()
    End Sub

    Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
        Category.Close()
        Category.TopLevel = False
        Main.penelmain.Controls.Add(Category)
        Category.FormBorderStyle = Windows.Forms.FormBorderStyle.None
        Category.WindowState = FormWindowState.Maximized
        Main.Show()
        Category.Show()
    End Sub
End Class